﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;
using HYOpeningCommon.OpeningEX;

namespace HYOpeningCreate.Cmd
{
	public class MassSelectionFilter : ISelectionFilter
	{
		public bool AllowElement(Element element)
		{
			if (OpeningXData.IsIncludeSchema(element))
			{
				using (Dictionary<Element, bool>.KeyCollection.Enumerator enumerator = CmdOpeningDimension.GetOpenings().Keys.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						if (enumerator.Current.Id == element.Id)
						{
							return true;
						}
					}
				}
				return false;
			}
			return false;
		}

		public bool AllowReference(Reference reference, XYZ position)
		{
			throw new NotImplementedException();
		}
	}
}
